/**
 * 纯渲染、无状态的文章预览组件
 */
import React, { Component, Proptypes } from "react";
import "./preview.css";

class Preview extends Component {
  static propTypes = {
    title: Proptypes.string,
    link: Proptypes.string
  };
  render() {
    const { title, date, description } = this.props;
    return (
      <article className="article-preview-item">
        <h1 className="title">{title}</h1>
        <span className="date">{date}</span>
        <p className="desc">{description}</p>
      </article>
    );
  }
}
export default Preview;
